<?php 
	$add_link_display   =  check_module('acd_servers', 'add') ? "" : "display:none";
	$edit_link_display  =  check_module('skill', 'edit') ? "" : "style='display:none'";
	$delete_link_display  =  check_module('skill', 'delete') ? "" : "style='display:none'";
?>

  <div class="successfull" style="display:<?php echo ($this->session->flashdata('userMesg') ? 'block' : 'none') ?> ">
                <?php echo $this->session->flashdata('userMesg'); ?>  
            </div>
            	
		<div >

    <div class="extra_links" style="padding:5px 0px; float:right;<?php echo $add_link_display; ?>" align="right">
        	<a class="button" href="<?php echo base_url().$this->uri->segment(1).'/save/'; ?>"><span>Add ACD Server</span></a>
      </div>
      <div style="clear:both"></div>
    
      
      
            	<div class="headingBox">
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_leftRound.jpg" width="5" height="24" alt="" /></div>
             	 <div class="red_midRound" style="width:992px;">ACD Servers</div>
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_rightRound.jpg" width="5" height="24" alt="" /></div>
            </div>
            
            <div class="whiteBox">
       			 <div class="tbl_bgcolor">
            <form action="<?php echo base_url(); ?>acd_servers" method="get">
                <input type="hidden" value="1" name="sbmt" id="action">
                <table width="30%" cellspacing="0" cellpadding="4" border="0" align="center">
                    <tbody>
                        <tr>
                            <td>
                                <strong>Name:</strong>
                            </td>
                            <td>
                                <input type="text" size="25" value="<?php echo $this->input->get('server_ip'); ?>" id="server_ip" name="server_ip"  >
                            </td>
                            <td>
                                <input type="submit" class="submitBtn_sml" value="">
                            </td>
                        </tr>
                    </tbody>
                </table>
            </form>
        </div>
    			</div>
            
      <div class="headingBox"  style="padding-top:10px;">
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_leftRound.jpg" width="5" height="24" alt="" /></div>
              <div class="red_midRound" style="width:992px;"><span class="red_midRound" style="width:992px;">ACD Servers</span></div>
                <div class="FloatLeft"><img src="<?php echo imageUrl(); ?>red_rightRound.jpg" width="5" height="24" alt="" /></div>
            </div>
            

            <div>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td><table width="100%" cellspacing="5" cellpadding="2" class="subContentTable">
                        <tr>
                        <td height="20" class="head3" width="30px;"># No</td>
                        <td height="20" class="head3">Server</td>
                        <td height="20" class="head3">Status</td>
                        <td height="20" class="head3">Edit</td>
                        <td height="20" class="head3">Delete</td>
                      </tr>
                        <?php 
						$cnt = 0;
						foreach($results as $row) 
						{
							$bg_color = ($cnt%2 == 0) ? "#ffffff" : "#fff1d5";
							$cnt++;
						?>
                        <tr bgcolor="<?php echo $bg_color; ?>">
                        <td align="left"><?php echo $cnt; ?></td>
                        <td align="left"><?php echo $row->server_ip; ?></td>
                        <td height="20" align="center" width="7%"><?php echo $row->status; ?></td>
                        <td align="center" valign="middle" <?php echo $edit_link_display; ?> ><a href="<?php echo base_url().'acd_servers/save/'.$row->id; ?>"> <img border="0" alt="Edit" title="Edit" src="<?php echo imageUrl(); ?>edit.png"> </a></td>
                        <td align="center" valign="middle" <?php echo $delete_link_display; ?> ><a href="<?php echo base_url().'acd_servers/delete/'.$row->id; ?>"> <img border="0" alt="Edit" title="Edit" src="<?php echo imageUrl(); ?>del_opt.gif"> </a></td>
                      </tr>
                        <?php 
							}
						?>
                      </table></td>
                  </tr>
              </table>
				</div>
  </div>           